#ifndef DINLINE_CURRENT
#define DINLINE_CURRENT
#include "stm32f1xx_hal.h"

class CurrSense
{
  public:
    CurrSense();
    float readADCVoltageInline(uint32_t pinA);
    void configureADCInline(uint32_t pinA,uint32_t pinB, uint32_t pinC);
    void calibrateOffsets();
    void init();
    void getPhaseCurrents();
    float current_a,current_b,current_c;
    uint32_t pinA;
    uint32_t pinB;
    uint32_t pinC;
    float offset_ia;
    float offset_ib;
    float offset_ic;
    float _shunt_resistor;
    float amp_gain;
    
    float volts_to_amps_ratio;
    
    float gain_a;
    float gain_b;
    float gain_c;
};

#endif